<?php
/* -------------------------------------------------------------------------------------
* 	ID:						$Id: translations.php 124 2013-09-21 12:11:27Z phone.mueller@googlemail.com $
* 	Letzter Stand:			$Revision: 124 $
* 	zuletzt geaendert von:	$Author: siekiera $
* 	Datum:					$Date: 2013-09-21 12:11:27 +0000 (Sat, 21 Sep 2013) $
*
* 	SEO:mercari by Siekiera Media
* 	http://www.seo-mercari.de
*
* 	Copyright (c) since 2011 SEO:mercari
* --------------------------------------------------------------------------------------
* 	based on:
* 	(c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
* 	(c) 2002-2003 osCommerce - www.oscommerce.com
* 	(c) 2003     nextcommerce - www.nextcommerce.org
* 	(c) 2005     xt:Commerce - www.xt-commerce.com
*
* 	Released under the GNU General Public License
* ----------------------------------------------------------------------------------- */

require('includes/application_top.php');

require_once(DIR_WS_INCLUDES.'/xajax/xajax_core/xajax.inc.php');
$xajax = new xajax();
require(DIR_FS_ADMIN.DIR_WS_INCLUDES.'xajax/xajax.translations.php');
require(DIR_WS_INCLUDES.'metatag.php');
$xajax->printJavascript();
?>
<script type="text/javascript">
	<!--
		function searchPhrase() {
			if($("#phrase").val().length > 2) {
				var lng_id = $("input:radio:checked[name='lang']").val();
				var val = $("#phrase").val();
				xajax_getDefines(val, lng_id);

			} else if($("#phrase").val().length == 0) {
				$('#translation_results').html('');
			}
		}
		function resetVal() {
			$('#phrase').val('');
			$('#translation_results').html('');
		}
		function saveNew(id, lang) {
			var def = $('#new_const_'+id).val();
			var txt = $('#new_text_'+id).val();
			xajax_saveNewDefines(def, txt, lang, id);
		}
		function save(id) {
			var def = $('#define_'+id).val();
			var txt = $('#text_'+id).val();
			var lng_id = $("input:radio:checked[name='lang']").val();
			xajax_saveDefines(def, txt, lng_id, id);
		}
	//-->
</script>
<link rel="stylesheet" type="text/css" href="includes/javascript/growl/jquery.gritter.css" />
<script type="text/javascript" src="includes/javascript/growl/jquery.gritter.min.js"></script>
<style type="text/css">
#phrase {font-size:160%; margin: 7px;padding: 8px; width: 98%; font-weight: 700; box-shadow: 0 2px 7px #888 inset;-moz-box-shadow: 0 2px 7px #888 inset;-webkit-box-shadow: 0 2px 7px #888 inset;}
.new_const {font-size: 120%; width: 220px; font-weight: 700}
</style>
</head>
<body>
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<div id="wrapper">
	<table class="outerTable" cellspacing="0" cellpadding="0">
		<tr>
			<td class="columnLeft2" width="<?php echo BOX_WIDTH; ?>" valign="top">
				<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
			</td>
			<td class="boxCenter" height="100%" valign="top">
	        	<table class="table_pageHeading" width="100%" cellspacing="0" cellpadding="0">
		   			<tr>
		     			<td class="pageHeading">Übersetzungen</td>
					</tr>
				</table>
				<table>
					<tr>
						<td>
							<p>
								Wählen Sie erst die Sprache, dann beginnen Sie mit dem Begriff, der in der Übersetzung vorkommt. Der Shop wird sofort versuchen, die entsprechende Stelle, in der Datenbank zu finden.
							</p>
						</td>
					</tr>
				</table>
				<table width="100%">
					<tr>
						<td width="140">
							<table width="100%">
							<?php
								$l = get_languages();
								for ($i = 0, $n = sizeof($l); $i < $n; $i++) {
									echo '<tr><td width="1"><input type="radio"'.($i==0?' checked':'').' name="lang" onclick="resetVal()" value="'.$l[$i]['id'].'" /></td><td><nobr><img src="../lang/'.$l[$i]['directory'].'/'.$l[$i]['image'].'" alt="'.$l[$i]['name'].'" /> '.$l[$i]['name'].'</nobr></td></tr>';
								}
							?>
							</table>
						</td>
						<td>
							<input type="text" value="" name="phrase" id="phrase" onkeyup="searchPhrase();" />
						</td>
						<td width="1" align="right">
							<button class="button" onclick="xajax_newDefinition();">
								Neue Definition
							</button>
						</td>
					</tr>
				</table>
				<div id="translation_results"></div>
		    </td>
		</tr>
	</table>
</div>
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>